using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace ShopForWeb.Models
{

  /// <summary>
  /// 用户
  /// </summary>
  [Table("T_User")]
  public class User
  {
    [Key]//主键
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    public int UserID { get; set; }
    [StringLength(11)]
    public string Phone { get; set; } = "";
    [StringLength(50)]
    public string Password { get; set; } = "";
    [StringLength(2)]
    public string Sex { get; set; } = "男";

    [StringLength(50)]
    public string Name { get; set; } = "";
    [StringLength(50)]
    public string Nick { get; set; } = "";

    public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
    public virtual ICollection<ShopCart> ShopCarts { get; set; } = new List<ShopCart>();
  }
}
